from ubuntu:16.04

# build work dir
#WORKDIR /home/python

# update apt sources/ali 
COPY ["sources.list", "requirements.txt", "vimrc", "run.sh", "pip.conf", "./"] 

# setting default chinese 
ENV LANG C.UTF-8

RUN chmod +x run.sh \
        && mkdir -p /home/python \
        && mv sources.list /etc/apt/ \
        && apt-get update \
        && apt-get install -y openssh-server \
        && mkdir -p /var/run/sshd \
        && ./run.sh \
        && apt-get install -y wget \
        && apt-get install -y vim \
        && mv vimrc /home/python/.vimrc \
        && apt-get install -y python \
        && apt-get install -y python-pip \
        && apt-get install -y python3 \
        && apt-get install -y python3-pip \
        && mv pip.conf /etc/pip.conf \ 
        && python -m pip install --upgrade pip \
        && python3 -m pip install --upgrade pip \
        && pip install -r requirements.txt \
        && pip3 install -r requirements.txt \
        && apt-get autoclean \
        && apt-get clean \
        && apt-get autoremove \ 
        && rm -r ~/.cache/pip 

CMD service ssh start && /bin/bash

